<template>
  <div class="count">
    <el-row :gutter="60">
      <el-col :span="6">
        <div class="grid-content bg-purple bg-purple-1">
          <p class="font-icon">
            <i class="iconfont icon-shiliangzhinengduixiang-copy"></i>
          </p>
          <p class="tip_text">
            <span>总金额:{{count_data.sum}}</span>
          </p>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple bg-purple-2">
          <p class="font-icon">
            <i class="iconfont icon-yetaizongbishu"></i>
          </p>
          <p class="tip_text">
            <span>总笔数:{{count_data.totle}}</span>
          </p>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple bg-purple-3">
          <p class="font-icon">
            <i class="iconfont icon-zhifuchenggongbishu"></i>
          </p>
          <p class="tip_text">
            <span>成功笔数:{{count_data.totle_suc}}</span>
          </p>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="grid-content bg-purple bg-purple-4">
          <p class="font-icon">
            <i class="iconfont icon-chenggong"></i>
          </p>
          <p class="tip_text">
            <span>成功总额:{{count_data.sum_suc}}</span>
          </p>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    name: 'count',
    data() {
      return {}
    },
    props: {
      count_data: {
        type: Object,
        default () {
          return {
            totle: 10, // 总笔数
            totle_suc: 10, // 成功笔数
            sum: 10, // 总金额
            sum_suc: 1 // 成功总额
          }
        }
      }
    }
  }
</script>

<style scoped>
  .count {
    padding: 30px;
    margin: 0 20px;
    background-color: #fff;
  }
  .iconfont {
    font-size: 40px;
  }
  .grid-content {
    text-align: center;
    padding: 10px;
    background-color: #e8e8e8;
    border-radius: 10px;
  }
  .bg-purple-1 {
    color: #5ab95d;
  }
  .bg-purple-2 {
    color: #4cb1cf;
  }
  .bg-purple-3 {
    color: #f34441;
  }
  .bg-purple-4 {
    color: #efad4d;
  }
  .font-icon {
    padding: 20px 0;
  }
  .tip_text {
    padding: 10px 0;
  }
</style>
